<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>添加授权公司</title>
	<link rel="stylesheet" type="text/css" href="{{asset('/js/layui-v2.3.0/layui/css/layui.css')}}">
	<link rel="stylesheet" type="text/css" href="{{asset('/common/css/commonality.css')}}">
	<link rel="stylesheet" type="text/css" href="{{asset('/css/professionalWork/AuthorizedCompanyManagement.css')}}">
	<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <script type="text/javascript" src="{{URL::asset('/common/js/jquery-1.10.1.min.js')}}"></script>
    <script src="{{asset('/common/js/validation/jquery.validate.min.js')}}"></script>
    <script src="{{asset('/common/js/validation/localization/messages_zh.min.js')}}"></script>
</head>
<body>
	<div class="box_page">
		<h1>添加授权公司</h1>
		<form action="addBusiness" method="post" class="form_box" enctype="multipart/form-data">
		{{csrf_field()}}
			<div class="input_box">
				<p><lable for="company_name">公司名称：<input type="text" placeholder="请输入" name="company_name" required></lable></p>
				<p><lable for="phone_name">联系人：<input	type="text" placeholder="请输入" name="phone_name" required></lable></p>
				<p><lable for="phone">联系电话：<input type="text" placeholder="请输入" name="phone" required></lable></p>
				<p><lable for="address">地址：<input type="text" placeholder="请输入" name="address" required></lable></p>
				<p><lable for="code">社会统一编码：<input	type="text" placeholder="请输入" name="code" required></lable></p>
				<p>
					<lable for="company_image">营业执照（选填）：
						<input type="file" class="upload_file" name="company_image" required onchange="doChange(this)" style="display:none;"/>
						<input class="photoCover" type="text" required placeholder="请上传图片" style="height:40px;width:219px;margin-left:-8px;border:1px solid #ccc" readonly= "true">
						<input type="button" required onclick="$('input[class=upload_file]').click();" class="mybutton" value="浏览" style="background:#CF2121;height:40px;width:80px;color:#fff;"/>
					</lable>
				</p>
			</div>
			<div class="btn_box">
				<input	class="submit" type="submit" name="submit" value="保存" style="background:#CF2121;height:40px;width:140px;color:#fff;">
			</div>
		</form>
		@include('flash::message')
	</div>
</body>
</html>
<script rel="stylesheet" type="text/css" src="{{URL::asset('/js/layui-v2.3.0/layui/layui.all.js')}}"></script>
<script>

    function doChange(file){
        var upload_file = $.trim($(".upload_file").val());    //获取上传文件
        $('.photoCover').val(upload_file);     //赋值给自定义input框
    }
</script>
